Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pre-release when release PR labelled as 'autorelease: pre-rele… #10

Conversation

dgellow
Copy link
Member

@dgellow dgellow commented Aug 28, 2023

This pull request adds a concept of "pre-release labels" that can be used on a release PR to denotate that the github release should be created as a pre-release. The label autorelease: pre-release is added directly by release-please when creating the PR if a pre-release is detected, but can also be added by users before merging the pull request.

In addition, to ensure labels can be selected by users via the "Labels dropdown" from GitHub UI, all labels are now created for the repository if they don't exist yet, before creating a pull request.

@dgellow dgellow marked this pull request as ready for review August 28, 2023 11:54
@dgellow
Copy link
Member Author

dgellow commented Aug 28, 2023

@RobertCraigie I went with autorelease: pre-release to follow what release-please is using for other labels but we can for sure change it to something else.

@dgellow dgellow force-pushed the sam/sta-2050-customers-should-have-way-to-mark-a-release-as-pre-release branch from d6bf21e to f339900 Compare August 28, 2023 12:50
@dgellow dgellow requested review from RobertCraigie and removed request for RobertCraigie August 29, 2023 14:47
@dgellow dgellow force-pushed the sam/sta-2050-customers-should-have-way-to-mark-a-release-as-pre-release branch from f339900 to ededd04 Compare August 29, 2023 14:53
return labels.data.map(l => l.name);
}

async createLabels(labels: string[]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: what permissions are needed for this to work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, I need to check...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Can you double check with a test repo just to make sure? (I'm fairly paranoid about GitHub doing weird things)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I will double check, I don't want to break the whole CI

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm, that seems to work with only Pull Request or only Issues as writeable :)

@dgellow dgellow requested a review from RobertCraigie August 30, 2023 13:50
src/github.ts Outdated Show resolved Hide resolved
src/manifest.ts Outdated Show resolved Hide resolved
Copy link
Member

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me, I don't have a lot of context on the code surrounding this though.

@dgellow dgellow force-pushed the sam/sta-2050-customers-should-have-way-to-mark-a-release-as-pre-release branch from ca37f76 to 1df72dc Compare August 31, 2023 16:30
@dgellow dgellow merged commit 7d77f3f into main Aug 31, 2023
7 checks passed
@dgellow dgellow deleted the sam/sta-2050-customers-should-have-way-to-mark-a-release-as-pre-release branch September 12, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants